/*
 * TestLogger.cpp
 *
 *   Created on: 2010-3-29     
 *  Description: 
 *    Copyright: 2010 @ ICT Li Heyuan
 */

#include "../include/util/Util.h"
#include "../include/util/Logger.h"

#include <sys/time.h>

#include <iostream>
using std::cout;
using std::endl;

void testLog()
{
	Logger log("server.log");
	log.info("abcdefg %d", 1);
}

struct timeval tv1, tv2;
void start()
{
	gettimeofday(&tv1, NULL);
}

void end()
{
	gettimeofday(&tv2, NULL);
	unsigned long timeuse = 1000000 * (tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec
			- tv1.tv_usec;
	timeuse /= 1000;
	cout << "Cost " << timeuse << " ms" << endl;
}

/*

 int main()
 {
 start();
 testLog();
 end();
 }

*/
